Added multiarch support to xm-test. Bumped version number to xm-test 1.0.
authorEwan Mellor <ewan@xensource.com>
Tue, 24 Oct 2006 13:47:17 +0000 (14:47 +0100)
committerEwan Mellor <ewan@xensource.com>
Tue, 24 Oct 2006 13:47:17 +0000 (14:47 +0100)
New README for public ramdisks.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xm-test/README
tools/xm-test/configure.ac
tools/xm-test/ramdisk/Makefile.am
tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img [new file with mode: 0644]
tools/xm-test/runtest.sh

index 22a07c40126e8f91f6448b51f84b06c7167e7692..9157f7681db91901b2ccb83625537a555f9cab35 100644 (file)
@@ -45,7 +45,7 @@ special files, this process must be done as root:
 NB: If you have the initrd.img from another installation of xm-test,
 you can copy it into the ramdisk directory to eliminate the need to
 rebuild it.  If you do this, there is no need to run 'make' again.
-Simply copy the initrd-X.Y.img file into ramdisk/ and then run:
+Simply copy the initrd-X.Y-ARCH.img file into ramdisk/ and then run:
 
    # make existing
 
@@ -53,7 +53,7 @@ Or, you can run:
    # INITRD="http://url.of.initrd.repo/" make existing
 
 You do not need to include the name of the image itself in the url, 
-however, an initrd with the right name (initrd.X.Y.img) and version 
+however, an initrd with the right name (initrd.X.Y-ARCH.img) and version 
 number must exist at that location.  The script will determine which 
 version of the initrd it needs and try to download the right file from 
 that location.
index 10091cc964e7ae6ae4cbb2b54a20184799093dd3..7eeeb76eab8e9bf8d8ff9c6f52ccd1d3761f3b1c 100644 (file)
@@ -1,9 +1,11 @@
 # xm-test configure.ac input script
 
 # Basic header information
-AC_INIT([xm-test], [0.8.0])
+AC_INIT([xm-test], [1.0.0])
 AM_INIT_AUTOMAKE([1.7 foreign])
 
+MK=''; AC_SUBST(MK)
+
 # Check for dependencies
 AC_PROG_CC
 #AC_PROG_INSTALL
index b5aca14d85324dd7e251ce74d83117e58af2664c..dd7f5ec058f1d2b8717179bab4b504eb3daafa8c 100644 (file)
@@ -1,19 +1,39 @@
+#
+# make existing:
+#
+#   Download a pre-built ramdisk.
+#     INITRD = <Directory to download ramdisk from>
+#
+# make initrd:
+#
+#   Make a ramdisk from scratch.
+#     BR_URL = <The URL of the Buildroot source code>
+#     BR_SNAPSHOT = 1  Set BR_URL to the upstream Buildroot daily snapshot.
+#     BR_ARCH = <The build architecture for the initrd>
+#
+
 INITRD ?= http://xm-test.xensource.com/ramdisks
 
-EXTRA_DIST = skel configs patches
+BR_ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
+
+@MK@ifdef BR_SNAPSHOT
+  BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
+@MK@else
+  BR_URL ?= http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2
+@MK@endif
+BR_TAR = $(notdir $(BR_URL))
 
-BR_TAR = buildroot-20060606.tar.bz2
-BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
-#BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
 BR_SRC = buildroot
-BR_IMG = $(BR_SRC)/rootfs.i386.ext2
+BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2
 
-BR_ROOT = build_i386/root
+BR_ROOT = build_$(BR_ARCH)/root
+
+EXTRA_DIST = skel configs patches
 
 HVM_SCRIPT = bin/create_disk_image
 
 XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
-XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
+XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER)-$(BR_ARCH).img
 
 EXTRA_ROOT_DIRS = sys
 
@@ -42,7 +62,7 @@ $(XMTEST_VER_IMG): $(BR_IMG)
        (cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
                | (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
        cd $(BR_SRC) && make
-       cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
+       cp $(BR_IMG) $(XMTEST_VER_IMG)
 
 initrd.img: $(XMTEST_VER_IMG)
        ln -sf $(XMTEST_VER_IMG) initrd.img
diff --git a/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img b/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img
new file mode 100644 (file)
index 0000000..a77476a
--- /dev/null
@@ -0,0 +1,45 @@
+XenSource xm-test 1.0 initrds
+=============================
+
+http://xm-test.xensource.com/ramdisks/initrd-1.0-i386.img and
+http://xm-test.xensource.com/ramdisks/initrd-1.0-powerpc.img are initrds
+suitable for use with Xen's xm-test regression testing suite.  They has been
+built and provided by XenSource, for the convenience of Xen users.  xm-test
+initrds may be mixed across minor xm-test versions, but not across major
+versions; this initrd is suitable for all 1.0.x versions of xm-test (as
+shipped with Xen 3.0.4 and the unstable tree leading up to that release).
+
+In order to use one of these initrds, run "./autogen; ./configure; make
+existing" inside the xm-test directory, and the appropriate initrd for your
+architecture will be downloaded automatically.  Alternatively, if you have
+already downloaded that file, place it into the xm-test/ramdisk directory and
+run the same command.  In either case, runtest.sh can then be used as normal.
+See xm-test/README for more details.
+
+These initrds were built using the infrastructure provided by xm-test.  Each
+is a full guest operating system and filesystem, and as such includes a large
+number of pieces of software.  The source code for the majority of these are
+included in full inside the file
+http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot.tar.bz2, where
+<INITRD> is either initrd-1.0-i386 or initrd-1.0-powerpc as appropriate, or
+alongside this file.  Copyright statements and licences are contained therein.
+The remaining source code is included in the Xen distribution, at
+http://www.xensource.com/xen/downloads/archives.html.  The configurations used
+for BusyBox, uClibc, and Buildroot are available as
+http://xm-test.xensource.com/ramdisks/<INITRD>-busybox-config,
+http://xm-test.xensource.com/ramdisks/<INITRD>-uClibc-config, and
+http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot-config respectively,
+or alongside this file.
+
+XenSource and the Xen contributors are grateful to the authors of these
+software packages for their contributions to free and open-source software.
+
+
+Buildroot and BusyBox are Copyright (c) Erik Andersen <andersen@codepoet.org>.
+BusyBox is licensed under the GNU General Public License (GPL).  A copy of
+this license is available in the file GPL-2,
+http://xm-test.xensource.com/ramdisks/GPL-2, or alongside this file.
+
+uClibc is licensed under the GNU Lesser General Public License (LGPL).  A copy
+of this license is available in the file
+http://xm-test.xensource.com/ramdisks/LGPL-2, or alongside this file.
index 2bcc46110fdc246e2e06f28cadfb1774fb31fb1d..623598cd203d288f6ee224fad3fff6ae82c45f8e 100755 (executable)
@@ -76,9 +76,11 @@ runnable_tests() {
     # using the right version
     realrd=$(readlink ramdisk/initrd.img)
     eval $(./lib/XmTestReport/xmtest.py)
-    rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}.img"
+    ARCH=$(uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
+    rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img"
     if [ "$realrd" != "$rrdver" ]; then
-       echo "Error: ramdisk/initrd.img is from an old version"
+       echo "Error: ramdisk/initrd.img is from an old version, or is not for this "
+        echo "architecture ($ARCH)."
        echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"
        exit 1
     fi